3.10.73 \(\int \frac {(a+b x)^2}{a c-b c x} \, dx\)

Optimal. Leaf size=43 \[ -\frac {4 a^2 \log (a-b x)}{b c}-\frac {(a+b x)^2}{2 b c}-\frac {2 a x}{c} \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.053, Rules used = {43} \begin {gather*} -\frac {4 a^2 \log (a-b x)}{b c}-\frac {(a+b x)^2}{2 b c}-\frac {2 a x}{c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x)^2/(a*c - b*c*x),x]

[Out]

(-2*a*x)/c - (a + b*x)^2/(2*b*c) - (4*a^2*Log[a - b*x])/(b*c)

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin {align*} \int \frac {(a+b x)^2}{a c-b c x} \, dx &=\int \left (-\frac {2 a}{c}-\frac {a+b x}{c}+\frac {4 a^2}{a c-b c x}\right ) \, dx\\ &=-\frac {2 a x}{c}-\frac {(a+b x)^2}{2 b c}-\frac {4 a^2 \log (a-b x)}{b c}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 37, normalized size = 0.86 \begin {gather*} -\frac {4 a^2 \log (a-b x)}{b c}-\frac {3 a x}{c}-\frac {b x^2}{2 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x)^2/(a*c - b*c*x),x]

[Out]

(-3*a*x)/c - (b*x^2)/(2*c) - (4*a^2*Log[a - b*x])/(b*c)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(a+b x)^2}{a c-b c x} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(a + b*x)^2/(a*c - b*c*x),x]

[Out]

IntegrateAlgebraic[(a + b*x)^2/(a*c - b*c*x), x]

________________________________________________________________________________________

fricas [A]  time = 1.23, size = 34, normalized size = 0.79 \begin {gather*} -\frac {b^{2} x^{2} + 6 \, a b x + 8 \, a^{2} \log \left (b x - a\right )}{2 \, b c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2/(-b*c*x+a*c),x, algorithm="fricas")

[Out]

-1/2*(b^2*x^2 + 6*a*b*x + 8*a^2*log(b*x - a))/(b*c)

________________________________________________________________________________________

giac [A]  time = 0.87, size = 46, normalized size = 1.07 \begin {gather*} -\frac {4 \, a^{2} \log \left ({\left | b x - a \right |}\right )}{b c} - \frac {b^{3} c x^{2} + 6 \, a b^{2} c x}{2 \, b^{2} c^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2/(-b*c*x+a*c),x, algorithm="giac")

[Out]

-4*a^2*log(abs(b*x - a))/(b*c) - 1/2*(b^3*c*x^2 + 6*a*b^2*c*x)/(b^2*c^2)

________________________________________________________________________________________

maple [A]  time = 0.00, size = 37, normalized size = 0.86 \begin {gather*} -\frac {b \,x^{2}}{2 c}-\frac {4 a^{2} \ln \left (b x -a \right )}{b c}-\frac {3 a x}{c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)^2/(-b*c*x+a*c),x)

[Out]

-1/2/c*x^2*b-3*a*x/c-4/c*a^2/b*ln(b*x-a)

________________________________________________________________________________________

maxima [A]  time = 1.29, size = 35, normalized size = 0.81 \begin {gather*} -\frac {4 \, a^{2} \log \left (b x - a\right )}{b c} - \frac {b x^{2} + 6 \, a x}{2 \, c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2/(-b*c*x+a*c),x, algorithm="maxima")

[Out]

-4*a^2*log(b*x - a)/(b*c) - 1/2*(b*x^2 + 6*a*x)/c

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 34, normalized size = 0.79 \begin {gather*} -\frac {8\,a^2\,\ln \left (b\,x-a\right )+b^2\,x^2+6\,a\,b\,x}{2\,b\,c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x)^2/(a*c - b*c*x),x)

[Out]

-(8*a^2*log(b*x - a) + b^2*x^2 + 6*a*b*x)/(2*b*c)

________________________________________________________________________________________

sympy [A]  time = 0.17, size = 31, normalized size = 0.72 \begin {gather*} - \frac {4 a^{2} \log {\left (- a + b x \right )}}{b c} - \frac {3 a x}{c} - \frac {b x^{2}}{2 c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)**2/(-b*c*x+a*c),x)

[Out]

-4*a**2*log(-a + b*x)/(b*c) - 3*a*x/c - b*x**2/(2*c)

________________________________________________________________________________________